package com.srwl.mytx.domain;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;

@Entity
public class InfiniteConnect implements Parcelable {
    @Id
    private String iId;
    @Index
    private String cId;
    private String connectKey;
    private Integer layer;
    private String authority;

//    public InfiniteConnect(String iId, String cId, String connectKey, String layer, String authority) {
//        this.iId = iId;
//        this.cId = cId;
//        this.connectKey = connectKey;
//        this.layer = layer;
//        this.authority = authority;
//    }


    public InfiniteConnect() {
        super();
    }

    @Generated(hash = 1251875638)
    public InfiniteConnect(String iId, String cId, String connectKey, Integer layer, String authority) {
        this.iId = iId;
        this.cId = cId;
        this.connectKey = connectKey;
        this.layer = layer;
        this.authority = authority;
    }

    public String getiId() {
        return iId;
    }

    public void setiId(String iId) {
        this.iId = iId;
    }

    public String getcId() {
        return cId;
    }

    public void setcId(String cId) {
        this.cId = cId == null ? null : cId.trim();
    }

    public String getConnectKey() {
        return connectKey;
    }

    public void setConnectKey(String connectKey) {
        this.connectKey = connectKey == null ? null : connectKey.trim();
    }



    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    public String getIId() {
        return this.iId;
    }

    public void setIId(String iId) {
        this.iId = iId;
    }

    public String getCId() {
        return this.cId;
    }

    public void setCId(String cId) {
        this.cId = cId;
    }

    public Integer getLayer() {
        return this.layer;
    }

    public void setLayer(Integer layer) {
        this.layer = layer;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.iId);
        dest.writeString(this.cId);
        dest.writeString(this.connectKey);
        dest.writeValue(this.layer);
        dest.writeString(this.authority);
    }

    protected InfiniteConnect(Parcel in) {
        this.iId = in.readString();
        this.cId = in.readString();
        this.connectKey = in.readString();
        this.layer = (Integer) in.readValue(Integer.class.getClassLoader());
        this.authority = in.readString();
    }

    public static final Creator<InfiniteConnect> CREATOR = new Creator<InfiniteConnect>() {
        @Override
        public InfiniteConnect createFromParcel(Parcel source) {
            return new InfiniteConnect(source);
        }

        @Override
        public InfiniteConnect[] newArray(int size) {
            return new InfiniteConnect[size];
        }
    };
}